<script setup>
import Login from './components/login.vue'
import Register from './components/register.vue'
import { ref } from 'vue'

const loginRef = ref(null)
const registerRef = ref(null)
</script>
<template>
  <div class="shadow">
    <div class="shell">
      <div class="animateLogin">
        <div class="center">
          <Login :ref="loginRef"></Login>
        </div>
      </div>

      <div class="animateRegister">
        <div class="center">
          <Register :ref="registerRef"></Register>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.shadow {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  box-shadow:
    10px 10px 10px #d1d9e6,
    -10px -10px 10px #f9f9f9;
  background-color: #ecf0f3;
}

.shell {
  width: 600px;
  height: 600px;
  overflow: hidden;
  position: relative;
  border-radius: 12px;
  box-shadow:
    10px 10px 10px #d1d9e6,
    -10px -10px 10px #f9f9f9;
  background-color: #ecf0f3;
}
@media (max-width: 1200px) {
  .shell {
    width: 420px;
    height: 420px;
  }
}

@media (max-width: 1000px) {
  .shell {
    width: 400px;
    height: 500px;
  }
}

@media (max-width: 600px) {
  .shell {
    width: 300px;
    height: 480px;
  }
}
.animateLogin {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.3s ease-in-out;
}
.center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.animateRegister {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: -100%;
  transition: all 0.3s ease-in-out;
}
</style>
